﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OFactoryRenovationEdit.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OFactoryRenovationEdit" %>
<div class="pageContent">
	<form method="post" action="MacModel/OFactoryRenovationEdit.aspx?ajaxmethod=edit&ID=<%=id %>" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<div class="pageFormContent" layoutH="56">
                 <p>
				    <label>发行日期：</label>
				    <input name="IssueDate" type="text" class="date required"  value="<%=obj.IssueDate.ToString("yyyy-MM-dd") %>" />
			    </p>
                <p>
				    <label>经销商：</label>
				    <input name="AgentName" type="text" class="required"  value="<%=obj.AgentName %>" />
			    </p>
            <div class="divider"></div>
                <p>
				    <label>机号：</label>
				    <input name="SerialNumber" type="text" class="required"  value="<%=obj.SerialNumber %>" />
			    </p>
                <p>
				    <label>需求部门：</label>
				    <select name="DemandDept">
                        <option value="营业部" <%=obj.DemandDept=="营业部"?"selected":"" %>>营业部</option>
                        <option value="风险部" <%=obj.DemandDept=="风险部"?"selected":"" %>>风险部</option>
                        <option value="服务部" <%=obj.DemandDept=="服务部"?"selected":"" %>>服务部</option>
				    </select>
			    </p>
              <div class="divider"></div>
                <p>
				    <label>返厂日期：</label>
				    <input name="ReturnDate" type="text" class="date required"  value="<%=obj.ReturnDate==DateTime.MinValue?"":obj.ReturnDate.ToString("yyyy-MM-dd") %>" />
			    </p>
                  <p>
				    <label>机器性质/类型：</label>
				    <select name="MachineProperty" id="Edit_MachineProperty">
                        <option value="样机" <%=obj.MachineProperty=="样机"?"selected":"" %>>样机</option>
                        <option value="退机" <%=obj.MachineProperty=="退机"?"selected":"" %>>退机</option>
                        <option value="返修车" <%=obj.MachineProperty=="返修车"?"selected":"" %>>返修车</option>
                        <option value="回购车" <%=obj.MachineProperty=="回购车"?"selected":"" %>>回购车</option>
				    </select>
			    </p>
              <div class="divider"></div>
                <p>
				    <label>工时：</label>
				    <input name="WorkTime" type="text" class=""  value="<%=obj.WorkTime %>" />
			    </p>
                <p>
				    <label>是否收费：</label>
				    <input name="IsCharges" type="checkbox" class=""  value="true"  <%=obj.IsCharges?"checked":"" %>/>
			    </p>
              <div class="divider"></div>
             <p>
				    <label>翻新内容：</label>
				    <input name="RenovationContent" type="text" class=""  value="<%=obj.RenovationContent %>" />
			    </p>
             <div id="Edit_BuyBackDIV" style=" clear:both;">
            <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">回购车信息</h2>
			    <p>
				    <label>回购成本（不含税）：</label>
				    <input name="BuyBackCost" type="text" class=""  value="<%=obj.BuyBackCost %>" />
			    </p>
                <p>
				    <label>运费：</label>
				    <input name="Freight" type="text" class=""  value="<%=obj.Freight %>" />
			    </p> 
                <p>
				    <label>三方协议：</label>
				    <input name="IsThreeParty" type="checkbox" class=""  value="true" <%=obj.IsThreeParty?"checked":"" %>/>
			    </p>
                <p>
				    <label>是否可开票：</label>
				    <input name="IsInvoice" type="checkbox" class=""  value="true" <%=obj.IsInvoice?"checked":"" %>/>
			    </p>
                <p>
				    <label>备注：</label>
				    <input name="BuyRemark"  type="text" class=""  value="<%=obj.Freight %>" />
			    </p>
            </div>
             <div  style=" clear:both;"></div>
             <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;clear:both;">翻新后信息</h2>
                <p>
				    <label>完成日期：</label>
				    <input name="CompDate"  type="text" class=""  value="<%=obj.CompDate%>" />
			    </p>
                <p>
				    <label>翻新后小时：</label>
				    <input name="CompWorkTime"  type="text" class=""  value="<%=obj.CompWorkTime %>" />
			    </p>
                <p>
				    <label>备注：</label>
				    <input name="CompRemark"  type="text" class=""  value="<%=obj.CompRemark %>" />
			    </p>
              <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;clear:both;">二 次 销 售</h2>
                <p>
				    <label>新经销商：</label>
				    <input name="NewAgentName"  type="text" class=""  value="<%=obj.NewAgentName %>" />
			    </p>
                <p>
				    <label>合同号：</label>
				    <input name="NewContractNo"  type="text" class=""  value="<%=obj.NewContractNo %>" />
			    </p>
                <p>
				    <label>合同金额：</label>
				    <input name="NewContractAmount"  type="text" class=""  value="<%=obj.NewContractAmount %>" />
			    </p>
             <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;clear:both;">翻新成本</h2>
                <p>
				    <label>服务领用配件成本：</label>
				    <input name="CostPart"  type="text" class=""  value="<%=obj.CostPart %>" />
			    </p>
                <p>
				    <label>营业部领用配件成本：</label>
				    <input name="CostYY"  type="text" class=""  value="<%=obj.CostYY %>" />
			    </p>
                <p>
				    <label>旧件残值：</label>
				    <input name="CostOldPieces"  type="text" class=""  value="<%=obj.CostOldPieces %>" />
			    </p>
                <p>
				    <label>其他费用：</label>
				    <input name="CostOther"  type="text" class=""  value="<%=obj.CostOther %>" />
			    </p>
               <h2 style=" padding:0px 0px 5px 6px; border-bottom:1px solid #B8D0D6;clear:both;">翻新收入</h2> 
                 <p>
				    <label>开票日期：</label>
				    <input name="InVoiceDate"  type="text" class="date"  value="<%=obj.InVoiceDate==DateTime.MinValue?"":obj.InVoiceDate.ToString("yyyy-MM-dd") %>" />
			    </p>
                <p>
				    <label>配件收入：</label>
				    <input name="InPart"  type="text" class=""  value="<%=obj.InPart %>" />
			    </p>
                <p>
				    <label>工时收入：</label>
				    <input name="InWork"  type="text" class=""  value="<%=obj.InWork %>" />
			    </p>
              
                <p>
				    <label>凭证号 ：</label>
				    <input name="InVoucher"  type="text" class=""  value="<%=obj.InVoucher %>" />
			    </p>
             <div class="divider"></div>
                 
                 <p>
				    <label>备注 ：</label>
				    <input name="Remark"  type="text" class=""  value="<%=obj.Remark %>" />
			    </p>
        </div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" > 提 交 </button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script>
    $(document).ready(function () {
       // $("#Edit_BuyBackDIV").find("input").attr("disabled", "disabled");
        if ($("#Edit_MachineProperty").val() != "回购车")
        {
            $("#Edit_BuyBackDIV").find("input").attr("disabled", "disabled");
        }
        $("#Edit_MachineProperty").change(function () {
            if ($(this).val() == "回购车") {
                $("#Edit_BuyBackDIV").find("input").attr("disabled", "");
            } else {
                $("#Edit_BuyBackDIV").find(":text").val("");
                $("#Edit_BuyBackDIV").find(":checkbox").attr("checked", "");
                $("#Edit_BuyBackDIV").find("input").attr("disabled", "disabled");
            }
        })
    })
</script>